package com.hengtian.roastwall.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
@Slf4j
public class TestAspect {
    @Before("execution(* com.hengtian.roastwall.controller.TestController.*(..))")
    public void before(){
        log.info("前前前");
    }
    @After("execution(* com.hengtian.roastwall.controller.TestController.*(..))")
    public void after(){
        log.info("后后后");
    }

    @Before("pointCut()")
    public void pointCutBefore(){
        log.info("pointCutBefore");
    }

    @Pointcut("execution(* com.hengtian.roastwall.controller.TestController.*(..))")
    public void pointCut(){
        // log.info("切点");
    }
}
